Conventionally, widespread is a game apparatus for allowing a player to enjoy a game by controlling a player object displayed on a game screen. For example, as disclosed in Japanese Laid-Open Patent Publication No. 2002-939 (hereinafter, referred to as Patent Document 1), a state where a player object is disposed on a plane game field in a virtual game space is picked up by a virtual camera so as to represent the state in an image, thereby generating a game screen.
When the game apparatus disclosed in Patent Document 1 is used, a player makes an input using a pointing device such as a touch panel. The game apparatus detects for a touch position at which the player touches the touch panel provided over a display screen for displaying the game screen, and subjects, to some change, a game object to be displayed on the display screen in accordance with the touch position, thereby representing the game. When the touch panel as disclosed in Patent Document 1 is used, the game screen is directly controlled so as to subject the game object to some change. Therefore, the player can directly control the object so as to develop the game on the screen, whereby the player can increasingly enjoy the game, and easily and accurately control the game.
A game which allows a player to control an object appearing in a two-dimensional virtual game world has been conventionally predominant. However, since performance of a computer has been significantly improved, a game which allows a player to control an object appearing in a three-dimensional virtual game space has become predominant in recent years. For example, when a method used for an exemplary RPG as disclosed in Patent Document 1 is used to control an object appearing in a three-dimensional virtual game space, a vector connecting between predetermined coordinates, representing a position of a player object or the like, in a virtual game space, and coordinates, on a game field in the virtual game space, calculated in accordance with touch coordinates is obtained. Thus, the player object is moved in accordance with a magnitude and a direction of the vector.
FIG. 10 is a side view illustrating an exemplary state where a touch panel TP is set in a virtual game space when a game image is rendered such that a plane game field GF in the virtual game space, on which a character PC to be operated is disposed, is vertically viewed from above. FIG. 11 is a side view illustrating an exemplary state where a touch panel TP is set in a virtual game space when a game image is rendered such that a plane game field GF in the virtual game space, on which a character PC to be operated is disposed, is diagonally viewed from above. That is, FIGS. 10 and 11 each shows a state where an image of the character PC to be operated on the plane game field GF is rendered through the touch panel TP attached over the display device on which the virtual game space is represented.
As shown in FIGS. 10 and 11, the virtual game space is rendered in the game image using an orthogonal projection (parallel projection) through the touch panel TP having center coordinates P0 set thereon, and the character PC to be operated is disposed at a position on which the center coordinates P0 are superimposed. At this time, a position, represented by the center coordinates P0, at which a player touches the touch panel TP corresponds to a position represented by coordinates p0 on the game field GF. A position represented by coordinates P1, apart from the center coordinates P0 over a distance D1, at which the player touches the touch panel TP corresponds to a position represented by coordinates p1 on the game field GF. A position represented by coordinates P2, apart from the center coordinates P0 over a distance D2, at which the player touches the touch panel TP corresponds to a position represented by coordinates p2 on the game field GF. Further, a distance between the coordinates p0 and the coordinates p1 is represented by d1, and a distance between the coordinates p0 and the coordinates p2 is represented by d2.
Thus, in a case where the game field GF is a plane, when the distance D1 and the distance D2, which are obtained by the player touch-operating the touch panel TP in the same direction (for example, the forward to backward direction in FIGS. 10 and 11), are equal to each other, the distance d1 is equal to the distance d2. That is, a distance between coordinates, on the game field GF, at which the character PC to be operated is positioned and coordinates, on the game field GF, corresponding to touch coordinates is proportional to a distance between the center coordinates P0 (that is, the position on which the character PC to be operated is superimposed) on the touch panel TP and the touch coordinates. Therefore, for example, when a movement speed of the character PC to be operated is controlled using the distance between coordinates, on the game field GF, at which the character PC to be operated is positioned and the coordinates, on the game field GF, corresponding to the touch coordinates, the movement speed of the character PC to be operated can be determined so as to be proportional to the distance between predetermined coordinates, on the touch panel TP, representing a position of a player object or the like and the touch coordinates.
However, the game field GF including a plurality of planes each having a different inclination or the game field GF of a curved surface may be set in the virtual game space. FIG. 12 is a side view illustrating an exemplary state where the touch panel TP is set in a virtual game space when a game image is rendered such that the character PC to be operated, on the game field GF of two planes each having a different inclination, is diagonally viewed from above. FIG. 13 is a side view illustrating an exemplary state where the touch panel TP is set in the virtual game space when a game image is rendered such that the character PC to be operated, on the game field GF of a curved surface, is diagonally viewed from above. That is, FIGS. 12 and 13 each shows a state where an image of the character PC to be operated, on the game field GF of a plurality of planes each having a different inclination or the game field GF of a curved surface, is rendered through the touch panel TP attached over the display device on which the virtual game space is represented.
As shown in FIGS. 12 and 13, the virtual game space is rendered in the game image using an orthogonal projection through the touch panel TP having center coordinates P0 set thereon, and the character PC to be operated is disposed at a position on which the center coordinates P0 are superimposed. At this time, a position represented by the center coordinates P0 at which a player touches the touch panel TP corresponds to a position represented by coordinates p0 on the game field GF. A position represented by coordinates P1, apart from the center coordinates P0 over a distance D1, at which the player touches the touch panel TP corresponds to a position represented by coordinates p1 on the game field GF. A position represented by coordinates P2, apart from the center coordinates P0 over a distance D2, at which the player touches the touch panel TP corresponds to a position represented by coordinates p2 on the game field GF. In this case, a distance between the coordinates p0 and the coordinates p1 is represented by d1, and a distance between the coordinates p0 and the coordinates p2 is represented by d2.
In a case where the game field GF is not formed by a single plane, even when the distance D1 is equal to the distance D2, the distance d1 is not necessarily equal to the distance d2. The same can be said for the case where the distance D1 and the distance D2 are obtained by a player touch-operating the touch panel TP in the same direction (for example, in the forward to backward direction in FIGS. 12 and 13). That is, a distance between coordinates, on the game field GF, representing a position of the character PC to be operated and coordinates, on the game field GF, corresponding to the touch coordinates is not proportional to a distance between the center coordinates P0 (that is, the position on which the character PC to be operated is superimposed) on the touch panel TP and the touch coordinates. Therefore, for example, when a movement speed of the character PC to be operated is controlled using the distance between coordinates, on the game field GF, representing the position of the character PC to be operated and the coordinates, on the game field GF, corresponding to the touch coordinates, the movement speed of the character PC to be operated may vary even when a distance obtained by touch-operating the touch panel TP is constant. This is because the distance between predetermined coordinates, on the touch panel TP, representing a position of the player object or the like and the touch coordinates is not physically proportional to the distance between coordinates, on the game field GF, representing the position of the character PC to be operated and the coordinates, on the game field GF, corresponding to the touch coordinates.
In a case where, for example, the movement speed of the character PC to be operated is determined based on the distance between position coordinates of the character PC to be operated and coordinate, on the game field GF, corresponding to the touch coordinates, even when a distance obtained by touch-operating the touch panel TP is physically constant, a distance corresponding to the physically constant distance may vary in the virtual game space depending on a shape of the game field GF. Specifically, as shown in FIGS. 10 and 11, the distance between the center coordinates P0 on the touch panel TP and the touch coordinates is proportional to the distance between the position coordinates of the character PC to be operated and the coordinates, on the game field GF, corresponding to the touch coordinates (however, in FIG. 11, the two distances are proportional to each other only when the touch-operation is performed in the same direction such as a forward direction or a backward direction), so that a desired movement speed can be always obtained when the player makes an input at such a position, on the touch panel TP, as to move, over a desired distance, the character PC to be operated. However, in manners shown in FIGS. 12 and 13, the distance between the center coordinates P0 on the touch panel TP and the touch coordinates is not proportional to the distance between the position coordinates of the character PC to be operated and the coordinates, on the game field GF, corresponding to the touch coordinates, so that a desired movement speed may not be necessarily obtained even when the player touch-operates the touch panel TP at such a position as to move, over a desired distance, the character PC to be operated. For example, as shown in FIGS. 12 and 13, while the distance D1=the distance D2 is satisfied, the distance d1 is longer than the distance d2. Therefore, a movement speed based on the touch coordinates P2 is lower than a movement speed based on the touch coordinates P1. As a result, a player may feel that a movement speed of the character PC to be operated cannot be obtained in accordance with the player touch-operating the touch panel TP, which may dissatisfy the player. This phenomenon often occurs in the game field GF, in the virtual game space, which is not formed by a single plane. The same can be said for the case where a game image of the virtual game space is rendered using perspective projection (far-to-near projection) from a viewpoint of a virtual camera. Therefore, the player is required to play a game in consideration of the inclination of the game field GF to the touch panel TP (that is, a depth dimension of the game field GF represented in a game image).
Therefore, a feature of the present invention is to provide a storage medium having stored thereon a game program and a game apparatus for allowing a player to play a game using a pointing device such as a touch panel for detecting for a position on a display screen, and preventing the player from feeling dissatisfied with a game play.
The present invention has the following features. The reference numerals, step numbers (a step is abbreviated as S and only a step number is indicated), and the like in the parentheses indicate the correspondence with the embodiment described below in order to aid in understanding the present invention and are not intended to be limiting in any way.
A first aspect of the present invention is directed to a storage medium having stored thereon a game program to be executed by a computer (21) of a game apparatus (1) which displays on a display screen (12) a game image representing at least a portion of a virtual game space, and which is operated using a pointing device (15) for detecting for a position, on the display screen, designated by a player. The game program causes the computer to execute: a designated coordinate acquisition step (S51); a target coordinate calculation step (S52); a distance calculation step (S54); a speed information calculation step (S54); and an object movement step (S59 to S61). The designated coordinate acquisition step acquires designated coordinates (TP), on the display screen, designated by the pointing device, and stores the designated coordinates in a memory (24). The target coordinate calculation step calculates target coordinates (Pt), in the virtual game space, corresponding to the designated coordinates, and stores the target coordinates in the memory. The distance calculation step calculates a distance (D) from reference coordinates (P0) set on the display screen to the designated coordinates. The speed information calculation step calculates speed information (Vt) using the distance. The object movement step moves a predetermined object (PC) toward the target coordinates in the virtual game space at a movement speed represented by the speed information. The pointing device is an input device for designating an input position or coordinates on the display screen, and includes a touch panel, a mouse, a track pad, and a track ball. A coordinate system used for each of the input devices is, for example, a touch panel coordinate system or a screen coordinate system.
In a second aspect based on the first aspect, the game program causes the computer to further execute a reference coordinate setting step (S53). The reference coordinate setting step sets, as the reference coordinates, a position, on the display screen, which is superimposed on a position (Ppc) at which an object to be operated by the player is displayed, and stores the reference coordinates in the memory.
In a third aspect based on the first aspect, a position of the reference coordinates is fixed as a center position of the display screen.
In a fourth aspect based on the first aspect, the target coordinate calculation step calculates, as the target coordinates, a position which is on a game field (FD) set in the virtual game space and on which the designated coordinates on the display screen are superimposed.
In a fifth aspect based on the first aspect, the speed information calculation step calculates a target speed of the object, using a predetermined function, as the speed information calculated from the distance (FIG. 9).
In a sixth aspect based on the fifth aspect, the speed information calculation step sets the target speed corresponding to the distance having a value greater than a first threshold value (D2), so as to have a constant value of a maximum target speed (Vtmax).
In a seventh aspect based on the fifth aspect, the speed information calculation step sets, when the distance has a value smaller than a second threshold value (D1), the target speed to zero.
In an eighth aspect based on the first aspect, the pointing device is a touch panel attached to the display screen.
A ninth aspect of the present invention is directed to a game apparatus which displays on a display screen a game image representing at least a portion of a virtual game space, and which is operated using a pointing device for detecting for a position, on the display screen, designated by a player. The game apparatus comprises: storage means; designated coordinate acquisition means; distance calculation means; target coordinate calculation means; speed information calculation means; and object movement means. The designated coordinate acquisition means acquires designated coordinates, on the display screen, designated by the pointing device, and stores the designated coordinates in the storage means. The distance calculation means calculates a distance from reference coordinates set on the display screen to the designated coordinates. The target coordinate calculation means calculates target coordinates, in the virtual game space, corresponding to the designated coordinates, and stores the target coordinates in the storage means. The speed information calculation means calculates speed information using the distance. The object movement means moves a predetermined object toward the target coordinates in the virtual game space at a movement speed represented by the speed information.
In a tenth aspect based on the ninth aspect, reference coordinate setting means is further provided. The reference coordinate setting means sets, as the reference coordinates, a position, on the display screen, which is superimposed on a position at which an object to be operated by the player is displayed, and stores the reference coordinates in the storage means.
In an eleventh aspect based on the ninth aspect, a position of the reference coordinates is fixed as a center position of the display screen.
In a twelfth aspect based on the ninth aspect, the target coordinate calculation means calculates, as the target coordinates, a position which is on a game field set in the virtual game space and on which the designated coordinates on the display screen are superimposed.
In a thirteenth aspect based on the ninth aspect, the speed information calculation means calculates a target speed of the object, using a predetermined function, as the speed information calculated from the distance.
In a fourteenth aspect based on the thirteenth aspect, the speed information calculation means sets the target speed corresponding to the distance having a value greater than a first threshold value, so as to have a constant value of a maximum target speed.
In a fifteenth aspect based on the thirteenth aspect, the speed information calculation means sets, when the distance has a value smaller than a second threshold value, the target speed to zero.
In a sixteenth aspect based on the ninth aspect, the pointing device is a touch panel attached to the display screen.
According to the first aspect, when the pointing device is used to move the object in the virtual game space, the movement speed is set to a value calculated from the distance between the reference coordinates and the designated coordinates on the display screen, and a moving direction is determined in accordance with the target coordinates, in the virtual game space, corresponding to the designated coordinates. That is, the movement speed can be determined in accordance with a physical distance, on the display screen, which is not influenced by a shape or an inclination of a game field in the virtual game space. Therefore, when the player designates, by using the pointing device, such a position as to input a desired distance, a desired movement speed is obtained. For example, when an operation performed by a joy stick is emulated, the inclination (angle of inclination) of the joy stick is determined in accordance with a physical distance based on the operation performed on the pointing device, and a direction toward which the joy stick is inclined is determined in accordance with a position, in the game space, based on the designated coordinates designated by the pointing device. Accordingly, while a player uses the pointing device so as to designate a position, in the game space, corresponding to a destination to move, the player can control the movement speed so as to operate the object without feeling dissatisfied.
According to the second aspect, the reference coordinates used as a reference for calculating the distance is set to a position at which an object to be moved is displayed. Therefore, the player can designate an input distance using, as the reference, the display position of the object to be moved. Therefore, the player can intuitively input the movement speed of the object to be moved.
According to the third aspect, the position of the reference coordinates used as the reference for calculating the distance is fixed as the center of the display screen, whereby the player can designate the input distance using the center of the display screen as the reference.
According to the fourth aspect, when the pointing device is used so as to move the object in the virtual game space, the target coordinates are set to the position, on the game field, on which the designated coordinates are superimposed, so as to obtain the moving direction. For example, when an operation performed by the joy stick is emulated, a direction toward which the joy stick is inclined is determined in accordance with the position, on the game field, on which a position represented by the designated coordinates designated by the pointing device is superimposed. Accordingly, while the player uses the pointing device so as to directly designate the position, in the game space, corresponding to a destination to move, the player can control the movement speed so as to operate the object without feeling dissatisfied.
According to the fifth aspect, the target speed of the object can be calculated by assigning, to a predetermined function, an input distance obtained by using the pointing device. Therefore, a target distance based on the input distance can be determined using the function. For example, the target distance can be set so as to be proportional to the input distance. Further, when the input distance is long, the target distance can be gradually increased, so that the target distance can be determined based on the input distance so as to represent various responses.
According to the sixth aspect, when a distance having a value greater than the first threshold value is inputted, the target speed is set so as to have a constant value of the maximum target speed. Accordingly, even when a shape of the display screen allows a relatively long distance to be inputted, the target speed can be set so as not to have a value greater than the maximum target speed. Therefore, it is possible to prevent the target speed from being determined depending on the shape of the display screen, thereby avoiding unbalanced game process.
According to the seventh aspect, an area in which the target speed is set to zero can be provided near the reference coordinates.
According to the eighth aspect, when the touch panel is used to move the object in the virtual game space, the movement speed is set to a value calculated from the distance between the reference coordinates and the touch coordinates on the touch panel, and a movement angle is determined in accordance with the target coordinates, in the virtual game space, corresponding to the touch coordinates on the touch panel. That is, the movement speed can be determined in accordance with a distance, in the touch panel coordinate system, which is not influenced by a shape or an inclination of a game field. Accordingly, when a player inputs a desired distance corresponding to a touch distance on the touch panel, a desired movement speed can be obtained. Accordingly, while the player designates, as a destination, a position in the game space corresponding to a position at which the player touches the touch panel, the player can control the movement speed so as to operate the object without feeling dissatisfied.
Further, the game apparatus according to the present invention can realize the same effect as the aforementioned storage medium having the game program stored thereon.
These and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.